import request from '@/utils/request'

/**
 *实现新增部门功能
*/
export function addDepartMents(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
/**
 *实现查询部门功能
*/
export function getDepartMents() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
/**
 *实现修改部门功能
*/
export function updateDepartMents(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
/**
 *实现删除部门功能
*/
export function delDepartMents(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
/**
 *实现查询部门详情
*/
export function geetDepartMents(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
